|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmisc.Queue
public class Queue
Array-based implementation of the queue.
| Constructor Summary | |
|---|---|
Queue()
Construct the queue. |
|
Queue(int size)
Construct the queue. |
|
| Method Summary | |
|---|---|
java.lang.Double |
dequeue()
Return and remove the least recently inserted item from the queue. |
void |
enqueue(java.lang.Double x)
Insert a new item into the queue. |
java.lang.Double |
getFront()
Get the least recently inserted item in the queue. |
boolean |
isEmpty()
Test if the queue is logically empty. |
void |
makeEmpty()
Make the queue logically empty. |
int |
size()
|
java.lang.Double[] |
toArray()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Queue()
public Queue(int size)
size - of the queue.| Method Detail |
|---|
public boolean isEmpty()
public void makeEmpty()
public java.lang.Double dequeue()
public java.lang.Double getFront()
public void enqueue(java.lang.Double x)
x - the item to insert.public int size()
public java.lang.Double[] toArray()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||